package es.ibm.santillana.mdm.integration;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.ibm.pim.attribute.AttributeDefinition;
import com.ibm.pim.attribute.AttributeInstance;
import com.ibm.pim.catalog.item.BaseItem;
import com.ibm.pim.catalog.item.Item;
import com.ibm.pim.collaboration.CollaborationItem;

import es.ibm.santillana.mdm.common.util.ConstSantillana;

/**
 * @author Benito
 *
 */

public class Modification {

	
	
	public String sociedad = null; 
	public ArrayList <AttributeInstance> changes = new ArrayList<AttributeInstance>();
	public ArrayList <AttributeInstance> pk = new ArrayList<AttributeInstance>(); 
	public List<ArrayList <AttributeInstance>> pack = new  ArrayList<ArrayList<AttributeInstance>>();
	public String componente = null;
	public BaseItem item = null;
	public BaseItem itemBefore = null;
	public List<AttributeInstance> getChanges() {
		return changes;
	}
	public void setChanges(ArrayList<AttributeInstance> changes) {
		this.changes = changes;
	}
	public List<AttributeInstance> getPk() {
		return pk;
	}
	public void setPk(ArrayList<AttributeInstance> pk) {
		this.pk = pk;
	}
	public String getSociedad() {
		return sociedad;
	}
	public void setSociedad(String sociedad) {
		this.sociedad = sociedad;
	}

	
	public void escribirModificacion (){
		Iterator <AttributeInstance> itAi = changes.iterator();
		System.out.println("--------------------");
		System.out.println("Changes and guajes");
		while (itAi.hasNext()) {
			System.out.println(itAi.next().getPath());
			//System.out.println(itAi.next().getValue());
		}
		System.out.println("--------------------");

		Iterator <AttributeInstance> itpk = pk.iterator();
		System.out.println("pecas y granos");
		while (itpk.hasNext()) {
			System.out.println(itpk.next().getPath());
			//System.out.println(itpk.next().getValue());
		}
		System.out.println("--------------------");
	}
	
	
}
